package com.example.lgseckill.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.lgseckill.domain.SeckillOrder;
import com.example.lgseckill.domain.UserSeckillOrderInfoVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Author:e
 * Date:2021/8/16 5:24 下午
 **/
public interface SeckillOrderMapper extends BaseMapper<SeckillOrder> {

    @Select("        SELECT" +
            "        seckill_order_id," +
            "        seckill_number," +
            "        pay_status," +
            "        pay_type," +
            "        create_time," +
            "        username," +
            "        seckill_price," +
            "        name" +
            "        FROM" +
            "        user_seckill_order_view" +
            "        WHERE user_id = #{userId}")
    List<UserSeckillOrderInfoVO> findSeckillOrderNowByUserId(@Param("userId") Long userId);
}
